import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import axios from 'axios'
import router from '@/router';

import store from '@/store';

import * as echarts from 'echarts';


import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/css/global.css'

import BaiduMap from 'vue-baidu-map';

axios.defaults.baseURL = 'http://127.0.0.1:9999/'
// 请求拦截器
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})

Vue.config.productionTip = false

Vue.prototype.$http = axios

Vue.prototype.$echarts = echarts

Vue.use(ElementUI)
Vue.use(BaiduMap, {
  ak: '3G9fkf9ZYqXPYd0B78RsMS3hFXZIaajv'
})

new Vue({
  render: h => h(App),
  router,
  store,
}).$mount('#app')
